﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class khcxresult : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }

        CreateList();

    }

    protected void CreateList()
    {
        object obj = Session["queryreslust"];
        string strtext = "";
        if (obj != null )
        {
            DataSet ds = (DataSet)obj;
            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        strtext += "<tr onmouseout=\"this.style.backgroundColor='';\" onmouseover=\"this.style.backgroundColor='#EBEBEB';\">";
                        strtext += string.Format("<td>{0}</td>",dr["name"]);
                        strtext += string.Format("<td>{0}</td>", dr["phone"]);
                        strtext += string.Format("<td>{0}</td>", util.GetShowName("quyu",dr["quyu"].ToString()));
                        strtext += string.Format("<td>{0}</td>", util.GetShowName("laiyuan", dr["laiyuan"].ToString()));
                        strtext += string.Format("<td>{0}</td>", util.GetShowName("yixiang", dr["yixiang"].ToString()));
                        strtext += string.Format("<td>{0}</td>", util.GetShowName("fukuan", dr["fukuan"].ToString()));
                        strtext += string.Format("<td>{0}</td>", dr["dt"].ToString());
                        strtext += string.Format("<td>{0}</td>", util.GetShowName("yuangong", dr["p_id"].ToString()));
                        strtext += "</tr>";
                    }
                }
            }

        }

        Literal1.Text = strtext;

    }


}
